/*
 * Copyright 2008 Wink Saville
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.saville.msgcomp;

//import com.saville.debug.*;

public class State implements IState {

    public State() {
        //Log.print("State: %s.State()", this.getClass().getName());
        this.parent = -1;
    }

    // @Override
    public void enterState(Msg msg) {
        // Log.print("State: %s.enterState(), do nothing",
        // this.getClass().getName());
    }

    // @Override
    public boolean doState(Msg msg) {
        // Log.print("State: %s.doState(), do nothing",
        // this.getClass().getName());
        return false;
    }

    // @Override
    public void exitState(Msg msg) {
        // Log.print("State: %s.exitState(), do nothing",
        // this.getClass().getName());
    }

    // @Override
    public State setHmc(IHmc hmc) {
        //Log.print("State: %s.sethmc()", this.getClass().getName());
        this.hmc = hmc;
        return this;
    }

    // @Override
    public State setHmcAndParent(IHmc hmc, int parent) {
        //Log.print("State: %s.sethmcAndParent(parent=%d)", this.getClass().getName(), parent);
        this.hmc = hmc;
        this.parent = parent;
        return this;
    }

    // @Override
    public State setParent(int parent) {
        //Log.print("State: %s.setParent(parent=%d)", this.getClass().getName(), parent);
        this.parent = parent;
        return this;
    }

    // @Override
    public int getParent() {
        return parent;
    }

    protected IHmc hmc;
    private int parent;
}
